package classes.web;
import org.junit.Test;

import java.net.*;
public class URLTest {
    @Test
    public void test(){
        try {
            URL url = new URL("https://tao-tech.oss-cn-shanghai.aliyuncs.com/The%20Complete%20Works%20of%20Tao%20Technology%202020.pdf");
            System.out.println(url.getProtocol());
            System.out.println(url.getHost());
            System.out.println(url.getPort());
            System.out.println(url.getPath());
            System.out.println(url.getFile());
            System.out.println(url.getQuery());
        } catch (MalformedURLException e) {
            e.printStackTrace();
        }

    }
}
